# 序列  类似索引数组

brands = 'dior, lv'
brand_indexs = ['dior', 'lv' , 'chanel', 'hermes', 'gucci']


print(brands.find('dior')!= -1) #找到字符串
print(',' in brands)
print('&'.join(brand_indexs))
exit()
#
# print(brand_indexs[-2])
# print(brand_indexs[0:3]) # 停止在第三个索引
# print(brand_indexs[::1]) #
exit('---字符串----')




# 序列  类似索引数组

brand_indexs = ['dior', 'lv' , 'chanel', 'hermes', 'gucci']
brands = ['dior', 'lv' , 'chanel', 'hermes', 'gucci']

del brand_indexs[0]

print(brand_indexs)

#
# print(brand_indexs[-2])
# print(brand_indexs[0:3]) # 停止在第三个索引
# print(brand_indexs[::1]) #
exit('---序列----')


# 集合  无序列表

brand_sets = set(['dior', 'lv' , 'chanel', 'hermes', 'gucci'])
others_sets = set(['dior', 'celine','coach'])

brand_sets.remove('dior')
print('dior' in brand_sets)

exit('---集合----')







#字典

brand_dists = {
    'name':'Juylovin',
    'age':'16',
    'phone':'15295535303',
}

print(brand_dists['age'])
exit('---字典----')



# 元组
brand_name = 'lv'
brands = ('lv', 'bv', 'mk')

brands = ('ck', brands)

print(brand_name[1])
print(brands[1][1])

#心得
# python 元组可以像数据一样操作读取
exit('---元组----')


# list
brandlist = ['chanel', ['dior', 'ysl'], 'gucci', 'hermes']

print(len(brandlist))

#新增元素
brandlist.append('celine')

print(brandlist[1])

del brandlist[0]
print('this is a object', brandlist)


for item in brandlist:
    print(item, end=' ')




exit('------------')


# 打印
name = 'yan yan'
age = '1岁啦'

print('{0} 已经 {1} , happy birthday to her '.format(name, age))

print('{name} 已经 {age} , happy birthday to her '.format(name='妍妍', age='one year'))

print(name)

count = (2 + 3) * 4
# count *= 3
print('my result', count)

# for 循环

for i in range(1,10,2): #1 - 10 步长 2
    print(i)
else:
    print('game over')

# 控制语句
if True:
    print('you is my baby')

# while True:
#     s = input('请输入你的幸运数字:')
#     if s == '4':
#         break
#     print('您的幸运数字是:', s)
# print('game over')

def mychanel(brand):

    '''

    这是一个输出品牌的方法
    :param brand:
    :return:
    '''
    print('chanel coco ',brand)


mychanel('香奈儿')
print(mychanel.__doc__)

if __name__ == '__main':

    print('my self')


# from  brandModel import topBrand,__version__

# print(topBrand('chanel'),__version__)

from vintage import brandModel

dir(brandModel)
# number = 23
# guess = int(input('输入你的年龄:'))
#
# if guess == number:
#     print('that is correct')
# else:
#     print('that is invalid')
